Optimal. Leaf size=83 \[ \frac {\log (d+e x) \left (a e^2-b d e+c d^2\right )}{e^2 (e f-d g)}-\frac {\log (f+g x) \left (a g^2-b f g+c f^2\right )}{g^2 (e f-d g)}+\frac {c x}{e g} \]
________________________________________________________________________________________
Rubi [A] time = 0.10, antiderivative size = 83, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.040, Rules used = {893} \begin {gather*} \frac {\log (d+e x) \left (a e^2-b d e+c d^2\right )}{e^2 (e f-d g)}-\frac {\log (f+g x) \left (a g^2-b f g+c f^2\right )}{g^2 (e f-d g)}+\frac {c x}{e g} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 893
Rubi steps
\begin {align*} \int \frac {a+b x+c x^2}{(d+e x) (f+g x)} \, dx &=\int \left (\frac {c}{e g}+\frac {c d^2-b d e+a e^2}{e (e f-d g) (d+e x)}+\frac {c f^2-b f g+a g^2}{g (-e f+d g) (f+g x)}\right ) \, dx\\ &=\frac {c x}{e g}+\frac {\left (c d^2-b d e+a e^2\right ) \log (d+e x)}{e^2 (e f-d g)}-\frac {\left (c f^2-b f g+a g^2\right ) \log (f+g x)}{g^2 (e f-d g)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.05, size = 85, normalized size = 1.02 \begin {gather*} -\frac {\log (d+e x) \left (-a e^2+b d e-c d^2\right )}{e^2 (e f-d g)}-\frac {\log (f+g x) \left (a g^2-b f g+c f^2\right )}{g^2 (e f-d g)}+\frac {c x}{e g} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {a+b x+c x^2}{(d+e x) (f+g x)} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.40, size = 99, normalized size = 1.19 \begin {gather*} \frac {{\left (c d^{2} - b d e + a e^{2}\right )} g^{2} \log \left (e x + d\right ) + {\left (c e^{2} f g - c d e g^{2}\right )} x - {\left (c e^{2} f^{2} - b e^{2} f g + a e^{2} g^{2}\right )} \log \left (g x + f\right )}{e^{3} f g^{2} - d e^{2} g^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.18, size = 88, normalized size = 1.06 \begin {gather*} \frac {c x e^{\left (-1\right )}}{g} + \frac {{\left (c f^{2} - b f g + a g^{2}\right )} \log \left ({\left | g x + f \right |}\right )}{d g^{3} - f g^{2} e} - \frac {{\left (c d^{2} - b d e + a e^{2}\right )} \log \left ({\left | x e + d \right |}\right )}{d g e^{2} - f e^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.01, size = 142, normalized size = 1.71 \begin {gather*} -\frac {a \ln \left (e x +d \right )}{d g -e f}+\frac {a \ln \left (g x +f \right )}{d g -e f}+\frac {b d \ln \left (e x +d \right )}{\left (d g -e f \right ) e}-\frac {b f \ln \left (g x +f \right )}{\left (d g -e f \right ) g}-\frac {c \,d^{2} \ln \left (e x +d \right )}{\left (d g -e f \right ) e^{2}}+\frac {c \,f^{2} \ln \left (g x +f \right )}{\left (d g -e f \right ) g^{2}}+\frac {c x}{e g} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.44, size = 87, normalized size = 1.05 \begin {gather*} \frac {{\left (c d^{2} - b d e + a e^{2}\right )} \log \left (e x + d\right )}{e^{3} f - d e^{2} g} - \frac {{\left (c f^{2} - b f g + a g^{2}\right )} \log \left (g x + f\right )}{e f g^{2} - d g^{3}} + \frac {c x}{e g} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 3.42, size = 84, normalized size = 1.01 \begin {gather*} \frac {\ln \left (d+e\,x\right )\,\left (c\,d^2-b\,d\,e+a\,e^2\right )}{e^3\,f-d\,e^2\,g}+\frac {\ln \left (f+g\,x\right )\,\left (c\,f^2-b\,f\,g+a\,g^2\right )}{g^2\,\left (d\,g-e\,f\right )}+\frac {c\,x}{e\,g} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 9.52, size = 420, normalized size = 5.06 \begin {gather*} \frac {c x}{e g} + \frac {\left (a g^{2} - b f g + c f^{2}\right ) \log {\left (x + \frac {a d e g^{2} + a e^{2} f g - 2 b d e f g + c d^{2} f g + c d e f^{2} - \frac {d^{2} e g \left (a g^{2} - b f g + c f^{2}\right )}{d g - e f} + \frac {2 d e^{2} f \left (a g^{2} - b f g + c f^{2}\right )}{d g - e f} - \frac {e^{3} f^{2} \left (a g^{2} - b f g + c f^{2}\right )}{g \left (d g - e f\right )}}{2 a e^{2} g^{2} - b d e g^{2} - b e^{2} f g + c d^{2} g^{2} + c e^{2} f^{2}} \right )}}{g^{2} \left (d g - e f\right )} - \frac {\left (a e^{2} - b d e + c d^{2}\right ) \log {\left (x + \frac {a d e g^{2} + a e^{2} f g - 2 b d e f g + c d^{2} f g + c d e f^{2} + \frac {d^{2} g^{3} \left (a e^{2} - b d e + c d^{2}\right )}{e \left (d g - e f\right )} - \frac {2 d f g^{2} \left (a e^{2} - b d e + c d^{2}\right )}{d g - e f} + \frac {e f^{2} g \left (a e^{2} - b d e + c d^{2}\right )}{d g - e f}}{2 a e^{2} g^{2} - b d e g^{2} - b e^{2} f g + c d^{2} g^{2} + c e^{2} f^{2}} \right )}}{e^{2} \left (d g - e f\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________